<meta charset="utf-8">
<div data-ng-controller="DoubleDetailController">
	<div style="padding-top: 0px; padding-left: 20px;z-index: 10;width:100%;position:fixed;height: 20px;margin-top: 20px;">
		<font color="#D3D1CC">电话会议</font> > <font color="#333333">双人通话权限</font>
	</div>
	
	<div class="form-group clearfix col-sm-12">
		<div class="col-xs-3 double_btn" style="top: 50px;">
			<div style="font-size: 12px; color: #00000; text-align: center; position: relative; left: 3px; top: 25%; cursor: pointer;"
				data-fc-org-user-picker data-type="user" data-title="新增人员" data-company-code={{companyCode}}
				data-localOrg="false" data-on-select="addUserAuthority($chosenList)">新建</div>
		</div>
		
		<div class="col-xs-3 double_btn" style="top: 50px;left: 15px;">
			<div style="font-size: 12px; color: #00000; text-align: center; position: relative; left: 3px; top: 25%; cursor: pointer;" data-ng-click="deleteAuthority()">权限删除</div>
		</div>

		<div class="col-xs-6" style="top: 50px; float: right;">
			<div style="position: relative; float: right;">
				<div style="float: right; line-height: 25px; position: relative; left: 15px">
					<input type="text" placeholder="搜索人员岗位" size="35" data-ng-change="search()" data-ng-model="searchKey" />
				</div>
			</div>
		</div>
		<!-- <div class="double_btn1">
			<div style="font-size: 12px; color: #00000; text-align: center; position: relative; left: 2px; top: 25%;cursor: pointer;">修改</div>
		</div> -->
	</div>
	
	<div class="form-group clearfix">
	
		<div class="form-group clearfix col-sm-3" style="top: 50px;">
			<div class="table-bordered table-striped table-hover" style="height: 31px;text-align: center; align:center;padding-top: 5px" >
				组织
			</div>
			<div>
				<div fc-org-tree-view="orgList" data-selected-org="selectedOrg" data-on-org-select="orgClick()" data-tree-param="treeParam"></div>
			</div>
		</div>
		
		<div class="form-group clearfix col-sm-9" style="top: 50px;">
			<table class="table table-bordered table-striped table-hover" style="text-align: center;" >
	            <thead>
	                <tr style="background-color: #f9f9f9"> 
	                	<th style="text-align: center;"><input type="checkbox"
							data-ng-click="toggleAll()" data-ng-checked="isSelectAll">
						</th> 
	                	<!-- <th style="text-align: center; align:center;" >序号</th> -->
	                    <th style="text-align: center; align:center;" >人员</th>
	                    <th style="text-align: center; align:center;" >登录名</th>
	                    <th style="text-align: center; align:center;" >岗位</th>
	                    <th style="text-align: center; align:center;" >范围</th>
	                    <th style="text-align: center; align:center;" >通话时长 </th>
	                    <th style="text-align: center; align:center;" >操作 </th>
	                </tr>
                </thead>
                <tbody>
	                <tr data-ng-if="data.length > 0" data-ng-repeat="record in data">
	                	<td style="width:8%;"><input type="checkbox" data-ng-checked="selectedUserList[record.userId]" style="cursor: pointer;" data-ng-click="toggleUser(record)">	</td>
	                	<!-- <td style="width:5%; cursor: pointer; text-align:center;">{{10*(currentPage-1)+$index+1}}</td> -->
	                    <td style="width:10%; cursor: pointer; text-align:center;">{{record.userName}}</td>
	                    <td style="width:10%; cursor: pointer; text-align:center;">{{record.loginName}}</td>
	                    <td style="width:20%; cursor: pointer; text-align:center;">{{record.userPost}}</td>
	                    <td ng-if ="record.range==1" style="width:20%; cursor: pointer; text-align:center;">本部门</td>
	                    <td ng-if ="record.range==2" style="width:20%; cursor: pointer; text-align:center;">企业通讯录</td>
	                    <td ng-if ="record.range==3" style="width:20%; cursor: pointer; text-align:center;">本地+企业通讯录</td>
	                    <td ng-if ="record.range==0" style="width:20%; cursor: pointer; text-align:center;"></td>
	                    <td style="width:15%; cursor: pointer; text-align:center;">{{record.callTime/60}}分钟</td>
	                    <td style="width:15%; cursor: pointer; text-align:center;">
	                    	<a href="javascript:void(0) " data-ng-click="deleteUserAuthority(record.userId)" style="color: red">删除</a>
	                    	<a href="javascript:void(0) " data-fc-edit-dauthority  data-choose-user="{{record.userId}}" data-company-code={{companyCode}} data-choose-user-name="{{record.userName}}" style="color: #29b4fc">修改</a>
	                    </td>
	                </tr>
                </tbody>
            </table>
            
                <div data-ng-if="data.length > 0" class="col-sm-12" style="padding-left: 0px;padding-right: 16px;padding-top: 0px;" >
					<div class="yahoo2">
						<span> <a style="cursor: pointer;" ng-click="gotoPage(1);">首页</a>
							<a style="cursor: pointer;" ng-click="upPage(currentPage-1);">上一页</a>
							<a style="cursor: pointer;" ng-click="nextPage(currentPage+1);">下一页</a>
							<a style="cursor: pointer;" ng-click="gotoPage(totalPage);">尾页</a>
						</span>
					
						当前第{{currentPage}} 页 共 {{totalPage}}页
					</div>
				</div>
        </div>
        
	</div>
</div>